﻿using GalaSoft.MvvmLight.Ioc;
using TabbedTemplate.Services;

namespace TabbedTemplate.ViewModels
{
    public class ViewModelLocator
    {
        /// <summary>
        /// 初始化店铺页面ViewModel。
        /// </summary>
        public IndexPageViewModel IndexPageViewModel =>
            SimpleIoc.Default.GetInstance<IndexPageViewModel>();

        public PunchPageViewModel PunchPageViewModel =>
            SimpleIoc.Default.GetInstance<PunchPageViewModel>();

        public StorePunchesViewModel StorePunchesViewModel =>
            SimpleIoc.Default.GetInstance<StorePunchesViewModel>();
        public NewIndexPageViewModel NewIndexPageViewModel =>
            SimpleIoc.Default.GetInstance<NewIndexPageViewModel>();

        public QueryPageViewModel QueryPageViewModel =>
            SimpleIoc.Default.GetInstance<QueryPageViewModel>();
        public StoreCollectionsPageViewModel StoreCollectionsPageViewModel =>
            SimpleIoc.Default.GetInstance<StoreCollectionsPageViewModel>();
        public QueryResultPageViewModel QueryResultPageViewModel =>
            SimpleIoc.Default.GetInstance<QueryResultPageViewModel>();
        public UserHomePageViewModel UserHomePageViewModel =>
            SimpleIoc.Default.GetInstance<UserHomePageViewModel>();

        public HelperPageViewModel HelperPageViewModel =>
            SimpleIoc.Default.GetInstance<HelperPageViewModel>();

        public CityLocationsViewModel CityLocationsViewModel =>
            SimpleIoc.Default.GetInstance<CityLocationsViewModel>();

        public PunchViewPageViewModel PunchViewPageViewModel =>
            SimpleIoc.Default.GetInstance<PunchViewPageViewModel>();

        public MyPunchesPageViewModel MyPunchesPageViewModel =>
            SimpleIoc.Default.GetInstance<MyPunchesPageViewModel>();

        public SyncPageViewModel SyncPageViewModel =>
            SimpleIoc.Default.GetInstance<SyncPageViewModel>();
        public DrawPicPageViewModel DrawPicPageViewModel =>
            SimpleIoc.Default.GetInstance<DrawPicPageViewModel>();
        public ImageViewModel ImageViewModel =>
            SimpleIoc.Default.GetInstance<ImageViewModel>();

        public ImagePopUpPageViewModel ImagePopUpPageViewModel =>
            SimpleIoc.Default.GetInstance<ImagePopUpPageViewModel>();
        /// <summary>
        /// ViewModelLocator。
        /// </summary>
        public ViewModelLocator()
        {
            SimpleIoc.Default.Register<ImagePopUpPageViewModel>();
            SimpleIoc.Default.Register<ImageViewModel>();
            SimpleIoc.Default.Register<DrawPicPageViewModel>();
            SimpleIoc.Default.Register<HelperPageViewModel>();
            SimpleIoc.Default.Register<IndexPageViewModel>();
            SimpleIoc.Default.Register<PunchPageViewModel>();
            SimpleIoc.Default.Register<StorePunchesViewModel>();
            SimpleIoc.Default.Register<NewIndexPageViewModel>();
            SimpleIoc.Default.Register<QueryResultPageViewModel>();
            SimpleIoc.Default.Register<QueryPageViewModel>();
            SimpleIoc.Default.Register<StoreCollectionsPageViewModel>();
            SimpleIoc.Default.Register<UserHomePageViewModel>();
            SimpleIoc.Default.Register<CityLocationsViewModel>();
            SimpleIoc.Default.Register<PunchViewPageViewModel>();
            SimpleIoc.Default.Register<MyPunchesPageViewModel>();
            SimpleIoc.Default.Register<SyncPageViewModel>();
            SimpleIoc.Default.Register<OneDriveFavoriteStorage>();
            SimpleIoc.Default.Register<OneDrivePunchInfoStorage>();
            SimpleIoc.Default.Register<IStoreService, StoreService>();
            SimpleIoc.Default.Register<IStoreStorage, StoreStorage>();
            SimpleIoc.Default.Register<IPunchNavigationService, PunchNavigationService>();
            SimpleIoc.Default.Register<IFavoriteStorage, FavoriteStorage>();
            SimpleIoc.Default.Register<ILocationService, LocationService>();
            SimpleIoc.Default.Register<IGeoLocationService, GeoLocationService>();
            SimpleIoc.Default.Register<IPreferenceStorage, PreferenceStorage>();
            SimpleIoc.Default.Register<IPunchPageActivationService, PunchPageActivationService>();
            SimpleIoc.Default.Register<IAlertService, AlertService>();
            SimpleIoc.Default.Register<IQueryService, QueryService>();
            SimpleIoc.Default.Register<IStoreStorage, StoreStorage>();
            SimpleIoc.Default.Register<IBeijingCacheService, BeijingCacheService>();
            SimpleIoc.Default.Register<ICityLocationsService, CityLocationsService>();
            SimpleIoc.Default.Register<IPunchInfoStorage, PunchInfoStorage>();
            SimpleIoc.Default.Register<IDataService, DataService>();
            SimpleIoc.Default.Register<ITextAnalysisService, TextAnalysisService>();
            SimpleIoc.Default.Register<IPickPhotoService, PickPhotoService>();
        }
    }
}
